package com.haruhinav.controller.admin;

import com.haruhinav.entity.Message;
import com.haruhinav.entity.extend.MessageEX;
import com.haruhinav.entity.vo.ResultVO;
import com.haruhinav.service.MessageService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/api/admin/message")
public class AdminMessageController {
    @Resource
    private MessageService messageService;
    //分页&条件复合查询
    @PostMapping("/y/list")
    public Map<String,Object> getMessageLimti(@RequestBody MessageEX msgEX){

        return messageService.getMessagelimit(msgEX);
    }
//    删除
    @PostMapping("/y/remove")
    public ResultVO delMsgById(@RequestBody Message msg){
        return messageService.delMsgById(msg);
    }
}
